package ac.you.api.nms;

import ac.you.api.AcYouAPI;

public enum Package {
    // net.minecraft.server
    NMS(new String(new byte[] {
            110, 101, 116, 46, 109, 105, 110, 101, 99, 114,
            97, 102, 116, 46, 115, 101, 114, 118, 101, 114 })),
    // org.bukkit..
    CRAFTBUKKIT(new String(new byte[] {
            111, 114, 103, 46, 98, 117, 107, 107, 105, 116,
            46, 99, 114, 97, 102, 116, 98, 117, 107, 107,
            105, 116 }));

    private final String uri;
    Package(String uri) {
        this.uri = uri;
    }
    public String a() {
        return this.uri;
    }
    public static boolean b(String c){
        Package[] vl = Package.values();
        c = c.substring(0,c.lastIndexOf("."));
        for (Package pa : vl) {
            if (AcYouAPI.NMS_Version != null){
                String v = pa.uri + "." + AcYouAPI.NMS_Version;
                return c.equals(v);
            }
        }
        return false;
    }
}
